#ifndef _SYS_STR_BUF_OUT_STREAM_H_
#define _SYS_STR_BUF_OUT_STREAM_H_

#include "OutStream.h"
#include "SysTypes.h"

#define STR_BUF_OUT_STREAM_VTABLE(self)   ((StrBufOutStreamVTable*)((FanObj*)self)->vtable)


extern Type*    StrBufOutStream_classType;
extern VTable*  StrBufOutStream_classVTable;


/* [sys::StrBufOutStream] Attributes */
struct StrBufOutStream
{
  OutStream     super;
  StrBuf*       sb;
};


/* [sys::StrBufOutStream] Virtual-table */
typedef struct StrBufOutStreamVTable
{
  OutStreamVTable super;
} StrBufOutStreamVTable;


/* [sys::StrBufOutStream] Methods and fields */
OutStream*      StrBufOutStream_write(OutStream* self, Int byte);
OutStream*      StrBufOutStream_writeBuf(OutStream* self, Buf* buf, Int n);
OutStream*      StrBufOutStream_writeChar(OutStream* self, Int ch);
OutStream*      StrBufOutStream_writeChars(OutStream* self, Str* str, Int off, Int len);


/* [sys::StrBufOutStream] Methods and fields */
StrBufOutStream* StrBufOutStream_new(StrBuf* sb);


/* [sys::StrBufOutStream] Type-system functions */
Type*           StrBufOutStream_initType(void);
VTable*         StrBufOutStream_initVTable(void);
void            StrBufOutStream_initStatic(void);


#endif
